package com.wwc.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
@RequestMapping("/consumer/payment")
@Slf4j
@Api(value = "OrderController")
public class OrderController{
	public static final String PAYMENT_ZK_URL = "http://provider-payment/payment";
	@Resource
	private RestTemplate restTemplate;
	
	@GetMapping("/paymentZK")
	@ApiOperation(value = "获取服务信息")
	public String getDiscovery(){
		return restTemplate.getForObject(PAYMENT_ZK_URL + "/paymentZK", String.class);
	}
	
}
